/* Initialize low and high mappings of all memory with 4MB pages */
mov $idle_pg_table-__PAGE_OFFSET,%edi
- mov $0x1e3,%eax /* PRESENT+RW+A+D+4MB+GLOBAL */
+ mov $0xe3,%eax /* PRESENT+RW+A+D+4MB */
1: mov %eax,__PAGE_OFFSET>>20(%edi) /* high mapping */
stosl /* low mapping */
add $(1<<L2_PAGETABLE_SHIFT),%eax
- cmp $DIRECTMAP_PHYS_END+0x1e3,%eax
+ cmp $DIRECTMAP_PHYS_END+0xe3,%eax
jne 1b
1: stosl /* low mappings cover as much physmem as possible */
add $(1<<L2_PAGETABLE_SHIFT),%eax
- cmp $__HYPERVISOR_VIRT_START+0x1e3,%eax
+ cmp $__HYPERVISOR_VIRT_START+0xe3,%eax
jne 1b
/* Initialise IDT with simple error defaults. */
void *ioremap_pt;
int i;
- /* Idle page table 1:1 maps the first part of physical memory. */
- for ( i = 0; i < DOMAIN_ENTRIES_PER_L2_PAGETABLE; i++ )
- idle_pg_table[i] =
- mk_l2_pgentry((i << L2_PAGETABLE_SHIFT) |
- __PAGE_HYPERVISOR | _PAGE_PSE);
+ /* Xen heap mappings can be GLOBAL. */
+ if ( cpu_has_pge )
+ {
+ for ( i = 0; i < DIRECTMAP_PHYS_END; i++ )
+ ((unsigned long *)idle_pg_table)
+ [(i + PAGE_OFFSET) >> L2_PAGETABLE_SHIFT] |= _PAGE_GLOBAL;
+ }
/* Create page table for ioremap(). */
ioremap_pt = (void *)alloc_xenheap_page();
/* Set up linear page table mapping. */
idle_pg_table[LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT] =
mk_l2_pgentry(__pa(idle_pg_table) | __PAGE_HYPERVISOR);
-
}
void __init zap_low_mappings(void)